0

私は、JavaベースのアプリケーションとJet.comを統合しています。Merchant Sku一括アップロードファイルを正常にアップロードできましたが、パートナーダッシュボードに「ファイルが見つかりません」というエラーが表示されます。Jet.Comバルクアップロードエラー

のJava APIコード:

 try { 

      String url = fileURL.get("url").toString().trim(); 
      String gzipFile = filePath + ".gz"; 
      FileInputStream fis = new FileInputStream(file); 
     FileOutputStream fos = new FileOutputStream(gzipFile); 
     GZIPOutputStream gzipOS = new GZIPOutputStream(fos); 
     byte[] buffer = new byte[1024]; 
     int len; 
     while((len=fis.read(buffer)) != -1){ 
      gzipOS.write(buffer, 0, len); 
     } 
     //close resources 
     gzipOS.close(); 
     fos.close(); 
     fis.close(); 

      HttpPut request = new HttpPut(url); 
      request.addHeader("x-ms-blob-type", "blockblob"); 

      FileEntity entity = new FileEntity(new File(gzipFile)); 
      entity.setContentType(ContentType.APPLICATION_OCTET_STREAM.toString()); 
      entity.setContentEncoding("gzip"); 
      request.setEntity(entity); 

      HttpResponse res = httpClient.execute(request); 
      System.out.println(EntityUtils.toString(res.getEntity())); 
      return true; 
    } 

Jet.comパートナーポータルでアップロードされたファイルを見ながら、それはエラー "ファイルが見つかりません" を与えます。私は問題がHttpPutファイルアップロードコードであるかもしれないと思うが、私は確信していない。

enter image description here

+0

緊急のためのddリクエスト/ ASAPなどをあなたの質問に、[もっと読む](http://meta.stackoverflow.com/q/326569)。ありがとう。 – halfer

+0

jet.comが返送するHTTPリターンコードは何ですか? –

+0

ファイルがJet.comサーバーにアップロードされていることを確認すると、戻りコードは200になりますが、File not foundエラーが出ます – Jayesh

答えて

0

{"SL-SBEC-32L":{"product_title":"Foldable Fabric Drawer Lagoon Blue","product_description":"Brighten up your home with a lagoon blue Foldable Fabric Drawer from Tidy Living. The bright blue drawer offers a convenient way to organize and sort small items like cords, keys, cooking utensils and more. The cube-style drawers are perfect for use with cube organizers, open shelving units and more. The fabric drawers feature an open top for easy access and versatility. A built-in fabric handle on the front makes the drawer easy to grip and easy to operate. Foldable Fabric Drawers from Tidy Living are a great addition to any home’s decor and can even be used as a seasonal update. The medium cube organizers measure 10.5” W x 10.5” D x 11” H and are the perfect size for most uses. Other colors of fabric drawers are also available including black, red, and brown.","brand":"Tidy Living","standard_product_codes":[{"standard_product_code":"849392007293","standard_product_code_type":"UPC"}],"mfr_part_number":"SL-SBEC-32L","jet_browse_node_id":13000263,"multipack_quantity":1,"main_image_url":"https:\/\/tidyliving.com\/pub\/media\/catalog\/product\/s\/l\/sl-sbec-32l_-_non-woven_fabric_foldable_fabric_drawer_-_blue_-_angle.jpg","alternate_images":[{"image_slot_id":1,"image_url":"https:\/\/tidyliving.com\/pub\/media\/catalog\/product\/s\/l\/sl-sbec-32l_-_non-woven_fabric_foldable_fabric_drawer_-_blue_-_sideways.jpg"},{"image_slot_id":2,"image_url":"https:\/\/tidyliving.com\/pub\/media\/catalog\/product\/s\/l\/sl-sbec-32l_-_non-woven_fabric_foldable_fabric_drawer_-_blue_-_front.jpg"}]}}

これは、ファイルが.json.gz形式にする必要がある、JSONファイルです。

  1. json.gz形式が正しいかどうかを確認してください。
  2. その後、「get url request」から取得したURLにアップロードしてください。
  3. 必要に応じて有効期限を延長してください。
  4. json.gzに適切なmerchantsku jsonファイルが含まれていることを確認してください。 5. Put要求ヘッダーにx-ms-blob-type :blockblobが含まれていることを確認します。
0

私はあなたが

https://developer.jet.com/docs/testinput-1 

を使用している場合は、あなたのURLは、このようにする必要がありますが、バルク品のアップロード、 に使用しているAPIのかわからないです:

https://prodimupload.blob.core.windows.net/merchant-files/ea74847dd3804e18a004233c4880e27b?sv=2015-04-05&sr=b&sig=6k2GN53DFdWSjFm%2BCA9nrA1i4nfGNVwmrYEzT%2FzVDPI%3D&se=2017-05-30T08%3A40%3A39Z&sp=w 

ましたあなたはこのapiを呼び出すときに取得します:

/files/uploadToken