jing_9774 2022-10-23 03:27
浏览 10
已结题

sp-api使用excle上传商品

sp-api使用excle上传商品

CreateFeedDocumentSpecification documentSpecification = new CreateFeedDocumentSpecification();
            documentSpecification.setContentType(contentType);
            CreateFeedDocumentResponse documentResponse = feedsApi.createFeedDocument(documentSpecification);
            String documentId = documentResponse.getPayload().getFeedDocumentId();
            String url = documentResponse.getPayload().getUrl();

            //上传
            OkHttpClient client = new OkHttpClient();
            Request request = new Request.Builder()
                        .url(url)
                        .put(RequestBody.create(MediaType.parse(contentType), new File(path)))
                        .build();

            Response response = client.newCall(request).execute();
            
            //创建feed
            CreateFeedSpecification createFeedSpecification = new CreateFeedSpecification();
            createFeedSpecification.setFeedType("POST_FLAT_FILE_LISTINGS_DATA");
            createFeedSpecification.setInputFeedDocumentId(documentId);
            createFeedSpecification.setMarketplaceIds(marketplaceIds);
            CreateFeedResponse createFeedResponse = feedsApi.createFeed(createFeedSpecification);

上传报告提示错误:The uploaded document has an illegal block size.
  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 10月31日
    • 创建了问题 10月23日

    悬赏问题

    • ¥15 关于stm32hal库驱动ft6336触摸屏遇到的问题
    • ¥15 需要手写数字信号处理Dsp三个简单题 不用太复杂
    • ¥15 数字信号处理考试111
    • ¥100 关于#audobe audition#的问题,如何解决?
    • ¥15 allegro17.2生成bom表是空白的
    • ¥15 请问一下怎么打通CAN通讯
    • ¥20 如何在 rocky9.4 部署 CDH6.3.2?
    • ¥35 navicat将excel中的数据导入mysql出错
    • ¥15 rt-thread线程切换的问题
    • ¥15 高通uboot 打印ubi init err 22